Send Template Message
AutomatR.WhatsApp.Activities.SendTemplateMessage
The "Send Template Message" activity in AutomatR is part of the WhatsApp activities package, providing the ability to send template messages via WhatsApp. This activity streamlines the process of sending predefined templates to a specific WhatsApp number.
Properties
Name | Description |
---|---|
Input | |
To WhatsApp Number | Specifies the recipient's WhatsApp number to which the template message should be sent. WhatsApp Number with country code, Example: 85264318721. Required argument. |
Template Name | Specifies the name of the pre-existing approved template to be used for the message. Required argument. |
Broadcast Name | Specifies the broadcast name. Required argument. |
Parameters | Specifies one or more objects that can be part of the body of the template message with their values. Required argument. Format: Dictionary<string, string>. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Send Template Message" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Response | Returns the response from the WhatsApp service. Variables of type SendTemplateMessageResponse to store the operation result. |
How to use:
- Drag and drop the "Send Template Message" activity onto the workflow.
- Configure the properties by specifying the WhatsApp number, template name, broadcast name, and parameters for the template message.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to send the specified template message to the designated WhatsApp number.
Example: Consider an example where the "Send Template Message" activity is used to send a template message to a WhatsApp number "85264318721":
Send Template Message:
Display Name: "Send Welcome Message"
To WhatsApp Number: "85264318721"
Template Name: "WelcomeTemplate"
Broadcast Name: "GeneralBroadcast"
Parameters: {"Name": "John", "Product": "AutomatR"}
Response: templateMessageResponse
In this example, the activity sends the "WelcomeTemplate" message to the WhatsApp number "85264318721" with parameters {"Name": "John", "Product": "AutomatR"}. The response is stored in the templateMessageResponse
variable for further handling in the workflow.